模块参考:命令(Command)

您所在的位置:网站首页 write off用法 模块参考:命令(Command)

模块参考:命令(Command)

2023-01-15 05:58| 来源: 网络整理| 查看: 265

# 模块参考:命令(Command) # actuator_test

Source: systemcmds/actuator_test (opens new window)

用于测试执行器的实用程序

警告:在使用此命令之前移除所有螺旋桨。

# 用法 actuator_test [arguments...] Commands: set 将一个执行器设置为一个指定的输出值 执行器可以是一个指定的电机、舵机或者 function directly: [-m ] 被测试的电机 (1...8) [-s ] 被测试的舵机 (1...8) [-f ] Specify function directly -v 值(-1...1) [-t ] 以秒为单位的超时时间 (如果没有设置则为交互式运行) 默认: 0 iterate-motors 使所有电机依次开始和停止 iterate-servos 使所有舵机依次开始和停止 # bl_update

Source: systemcmds/bl_update (opens new window)

用于从文件刷新引导加载程序的实用程序

# 用法 bl_update [arguments...] setopt 设置选项比特来解锁 FLASH (只有在锁定状态下需要) Bootloader bin 文件 # bsondump

Source: systemcmds/bsondump (opens new window)

read BSON from a file and print in human form

# 用法 bsondump [arguments...] File name # dumpfile

Source: systemcmds/dumpfile (opens new window)

转储文件实用程序。 以二进制模式(不要用 CR LF 替换 LF)将文件大小和内容打印到标准输出。

# 用法 dumpfile [arguments...] 被转储的文件 # dyn

Source: systemcmds/dyn (opens new window)

# 描述

加载并运行一个没有被编译进 PX4 的二进制文件的动态 PX4 模块

# 示例 dyn ./hello.px4mod start

# 用法 dyn [arguments...] 包含模块的文件 [arguments...] 输入模块的参数 # failure

Source: systemcmds/failure (opens new window)

# 描述

向系统中注入故障。

# 实现

此系统命令通过 uORB 发送一个机体命令来出发故障。

# 示例

通过停止GPS来测试GPS故障保护:

failure gps off

# 用法 failure [arguments...] help 显示此帮助文档 gps|... 指定的组件 ok|off|... 指定的故障类型 [-i ] 传感器实例 (0=all) 默认: 0 # gpio

Source: systemcmds/gpio (opens new window)

# 描述

此命令用于读写GPIO

gpio read / [PULLDOWN|PULLUP] [--force] gpio write / [PUSHPULL|OPENDRAIN] [--force] # 示例

读取配置为上拉的 PH4 引脚,它的值为高

gpio read H4 PULLUP

1 OK

设置 PE7 的输出值为高

gpio write E7 1 --force

设置 device /dev/gpin1 的输出值为高

gpio write /dev/gpin1 1

# 用法 gpio [arguments...] read / GPIO 的端口和引脚 [PULLDOWN|PULLUP] 下拉/上拉 [--force] 强制 (忽略板gpio列表) write GPIO 的端口和引脚 要写入的值 [PUSHPULL|OPENDRAIN] 推挽/开漏 [--force] 强制 (忽略板gpio列表) # hardfault_log

Source: systemcmds/hardfault_log (opens new window)

Hardfault 实用程序

在启动脚本中用于处理 hardfaults。

# 用法 hardfault_log [arguments...] Commands: check Check if there's an uncommitted hardfault rearm Drop an uncommitted hardfault fault Generate a hardfault (this command crashes the system :) [0|1] Hardfault type: 0=divide by 0, 1=Assertion (default=0) commit Write uncommitted hardfault to /fs/microsd/fault_%i.txt (and rearm, but don't reset) count Read the reboot counter, counts the number of reboots of an uncommitted hardfault (returned as the exit code of the program) reset Reset the reboot counter # hist

Source: systemcmds/hist (opens new window)

Command-line tool to show the px4 message history. There are no arguments.

# 用法 hist [arguments...] # i2cdetect

Source: systemcmds/i2cdetect (opens new window)

用于扫描特定总线上的 I2C 设备的实用程序。

# 用法 i2cdetect [arguments...] [-b ] I2C 总线 default: 1 # led_control

Source: systemcmds/led_control (opens new window)

# 描述

用于控制和测试(外部)LED 的命令行工具

要使用它,请确保有一个处理 led_control 的 uorb 主题的设备正在运行。

有不同的优先级,例如一个模块可以设置低优先级的颜色,另一个模块可以高优先级闪烁 N 次,闪烁后 LED 自动返回低优先级状态。 该 rese t命令还可用于返回较低的优先级。

# 示例

第一个 LED 闪烁蓝光 5 次:

led_control blink -c blue -l 0 -n 5

# 用法 led_control [arguments...] Commands: test 运行一个测试示例 on 打开 LED off 关闭 LED reset 复位 LED 优先级 blink 使LED闪烁 N 次 [-n ] 闪烁的次数 默认: 3 [-s ] 设置闪烁速度 值: fast|normal|slow, 默认: normal breathe 渐变 LED 亮 & 暗 flash 以 1Hz 的频率 先快闪两次再熄灭 以下参数适用于所有除 ‘test’ 的命令: [-c ] color 值: red|blue|green|yellow|purple|amber|cyan|white, 默认: white [-l ] 被控制的 LED : 0, 1, 2, ... (默认=all) [-p ] 优先级 默认: 2 # listener

Source: systemcmds/topic_listener (opens new window)

监听 uORB 主题并将数据打印到控制台的实用程序。

可以通过按 Ctrl+C、Esc 或 Q 随时退出侦听器。

# 用法 listener [arguments...] Commands: uORB 主题名 [-i ] 主题实例序号 默认: 0 [-n ] 消息数量 默认: 1 [-r ] 订阅频率 (0为无限制) 默认: 0 # mfd

Source: systemcmds/mft (opens new window)

交互显示的实用程序

# 用法 mfd [arguments...] Commands: query 如果不存在返回 ture # mtd

Source: systemcmds/mtd (opens new window)

挂载和测试分区的实用程序(基于板定义的 FRAM/EEPROM 存储)

# 用法 mtd [arguments...] Commands: status 打印状态信息 readtest 执行读取测试 rwtest 执行读写测试 erase 擦除分区 命令‘readtest’和‘rwtest'有一个可选的实例索引: [-i ] 存储索引 (如果板拥有多个存储) 默认: 0 命令 'readtest', 'rwtest' and 'erase' 有一个可选的参数: [ [ ...]] 分区名 (eg. /fs/mtd_params), 未提供时使用系统默认值 # nshterm

Source: systemcmds/nshterm (opens new window)

在指定端口启动一个 NSH shell。

该命令此前被用于在 USB 串口端口开启一个 shell。 现在运行mavlink,并且可以在mavlink 上使用shell。

# 用法 nshterm [arguments...] 启动 shell 的设备 (eg. /dev/ttyACM0) # param

Source: systemcmds/param (opens new window)

# 描述

通过 shell 或脚本访问和操作参数的命令。

例如,这在启动脚本中用于设置特定于机身的参数。

更改时会自动保存参数,例如 使用 param set。 它们通常存储在 FRAM 或 SD 卡中。 param select 可用于更改后续保存的存储位置(需要在每次启动时(重新)配置)。

如果启用了基于 FLASH 的后端(这是在编译时完成的,例如对于 Intel Aero 或 Omnibus), param select 则没有任何效果,并且默认始终是 FLASH 后端。 但是 param save/load 仍可用于写入/读取文件。

每个参数有一个“已使用”的标志,此标志在启动过程参数被读取后被置位。 它只是用于向地面控制站显示相关参数。

# 示例

更改机身并确保已加载机身的默认参数:

param set SYS_AUTOSTART 4001 param set SYS_AUTOCONFIG 1 reboot

# 用法 param [arguments...] Commands: load Load params from a file (overwrite all) [] File name (use default if not given) import Import params from a file [] File name (use default if not given) save Save params to a file [] File name (use default if not given) select Select default file [] File name select-backup Select default file [] File name show Show parameter values [-a] Show all parameters (not just used) [-c] Show only changed params (unused too) [-q] quiet mode, print only param value (name needs to be exact) [] Filter by param name (wildcard at end allowed, eg. sys_*) show-for-airframe Show changed params for airframe config status Print status of parameter system set Set parameter to a value Parameter name and value to set [fail] If provided, let the command fail if param is not found set-default Set parameter default to a value [-s] If provided, silent errors if parameter doesn't exists Parameter name and value to set [fail] If provided, let the command fail if param is not found compare Compare a param with a value. 如果相等命令会执行成功 [-s] 如果提供,参数不存在时引起无声错误 参数名和被比较的值 greater 将参数同某个值比较。 如果参数值比该值大 则命令执行成功 [-s] 将参数同某个值比较。 参数名和被比较的值 参数名和被比较的值 touch 标记已使用的参数 [ []] 参数名 (一个或多个) reset 复位指定的参数为默认值 [ []] 复位的参数名 (结尾的通配符是被允许的) reset_all 复位所有的参数为默认值 [ []] 不复位匹配参数 (结尾的通配符是被允许的) index 显示给定索引的参数 索引: 一个 >= 0 的整数 index_used 显示给定索引的已用参数 索引: 一个 >= 0 的整数 find 显示参数的索引 参数名 # payload_deliverer

Source: modules/payload_deliverer (opens new window)

# 描述

Handles payload delivery with either Gripper or a Winch with an appropriate timeout / feedback sensor setting, and communicates back the delivery result as an acknowledgement internally

# 用法 payload_deliverer [arguments...] Commands: start gripper_test Tests the Gripper's release & grabbing sequence gripper_open Opens the gripper gripper_close Closes the gripper stop status print status info # perf

Source: systemcmds/perf (opens new window)

性能计数器打印工具

# 用法 perf [arguments...] reset 复位所有计数器 latency 打印 HRT 定时器延迟柱状图 如果未给出参数则打印所有性能计数器 # reboot

Source: systemcmds/reboot (opens new window)

重启系统

# 用法 reboot [arguments...] [-b] 重启进入bootloader [lock|unlock] 使用/释放关机锁 (用于测试) # sd_bench

Source: systemcmds/sd_bench (opens new window)

测试SD卡速度

# 用法 sd_bench [arguments...] [-b ] 每次读/写的块大小 默认: 4096 [-r ] 运行次数 默认: 5 [-d ] 以毫秒为单位的运行持续时间 默认: 2000 [-k] 保持测试文件 [-s] 在每个块后调用 fsync (默认=每次运行结束) [-u] 使用非对其数据测试性能 [-v] 校验数据和块序号 # sd_stress

Source: systemcmds/sd_stress (opens new window)

在 SD 卡上测试操作

# 用法 sd_stress [arguments...] [-r ] 运行次数 默认: 5 [-b ] 字节数量 默认100: 100 # serial_passthru

Source: systemcmds/serial_passthru (opens new window)

把数据从一个设备传输到另一个设备。

This can be used to use u-center connected to USB with a GPS on a serial port.

# 用法 serial_passthru [arguments...] -e External device path values: -d Internal device path values: [-b ] Baudrate default: 115200 [-t] Track the External devices baudrate on internal device # 系统时间

Source: systemcmds/system_time (opens new window)

# 描述

Command-line tool to set and get system time.

# 示例

Set the system time and read it back

system_time set 1600775044 system_time get

# 用法 system_time [arguments...] Commands: set Set the system time, provide time in unix epoch time format get Get the system time # top

Source: systemcmds/top (opens new window)

Monitor running processes and their CPU, stack usage, priority and state

# 用法 top [arguments...] once print load only once # usb_connected

Source: systemcmds/usb_connected (opens new window)

Utility to check if USB is connected. Was previously used in startup scripts. A return value of 0 means USB is connected, 1 otherwise.

# 用法 usb_connected [arguments...] # ver

Source: systemcmds/ver (opens new window)

Tool to print various version information

# 用法 ver [arguments...] Commands: hw Hardware architecture mcu MCU info git git version information bdate Build date and time gcc Compiler info bdate Build date and time px4guid PX4 GUID uri Build URI all Print all versions hwcmp Compare hardware version (returns 0 on match) [] Hardware to compare against (eg. PX4_FMU_V4). An OR comparison is used if multiple are specified hwtypecmp Compare hardware type (returns 0 on match) [] Hardware type to compare against (eg. V2). An OR comparison is used if multiple are specified 在 GitHub 上编辑此页 (opens new window) Last Updated: 1/2/2023, 3:18:57 AM

← 手动生成客户端和代理端代码 通信 →



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3